﻿#ifndef BIZADD_H
#define BIZADD_H

#include "itemadd.h"
#include <QSqlTableModel>

namespace Ui {
class BizAdd;
}

class BizAdd : public ItemAdd
{
    Q_OBJECT

public:
    explicit BizAdd(QWidget *parent = 0);
    ~BizAdd();

    void closeEvent(QCloseEvent *);
    bool saveIndex();
    bool saveDetail();
    void updateView(const QString &uid);

private slots:
    void on_btn_save_clicked();
    void on_btn_submit_clicked();

private:
    Ui::BizAdd *ui;

    bool newFlag;
    QPair<QString,QString> pair;

    QString detailTable;
    QString _uid;
    QString contact,phone,express,remark;
    QString name,number,situation;

    QSqlTableModel *model;
};

#endif // BIZADD_H
